from __future__ import annotations

from dataclasses import dataclass


@dataclass
class WaistRingCheck:
    ring_tension_kN: float
    clamp_force_kN: float
    ok: bool
    note: str


def check_waist_ring(load_kN: float, number_of_rings: int, friction_coeff: float = 0.3, allowable_per_ring_kN: float = 120.0) -> WaistRingCheck:
    """腰环受力：按抱杆与塔材间摩擦夹持，均分到腰环。"""

    per = load_kN / max(1, number_of_rings)
    clamp = per / max(1e-6, friction_coeff)
    ok = per <= allowable_per_ring_kN
    return WaistRingCheck(ring_tension_kN=per, clamp_force_kN=clamp, ok=ok, note="需结合塔材强度复核")


